package com.service.impl;

import java.util.List;

import com.base.PageBean;
import com.base.UserBean;
import com.bean.Parkinfo;
import com.bean.Userinfo;
import com.dao.UserinfoDao;
import com.service.UserinfoService;
import com.util.GUtil;

public class UserinfoServiceImpl implements UserinfoService{
	UserinfoDao dao;
	@Override
	public Object get(Integer id) throws Exception {
		return dao;
	}

	@Override
	public List<Object> query(Object object) throws Exception {
		return dao.findAll();
	}

	@Override
	public String add(Object userinfo) throws Exception {
		return dao.save((Userinfo)userinfo);
	}

	@Override
	public String update(Object userinfo) throws Exception {
		return dao.update((Userinfo)userinfo);
	}

	@Override
	public String delete(Long id, Integer flag) throws Exception {
		return dao.delete(id, flag);
	}

	@Override
	public Object gett(Long id) {
		
		return dao.findById(id);
	}

	@Override
	public String deleteUserinfo(Userinfo userinfo) {
		return dao.delete(userinfo);
		
	}

	@Override
	public void updateOrder(Userinfo order) {
		
		
	}

	@Override
	public Userinfo findByuserId(Long id) {
		
		return dao.findById(id);
	}


	@Override
	public String updateuserandrecord(Userinfo user, Userinfo parkOrder) {
		
		return null;
	}

	@Override
	public List<Userinfo> query(Userinfo object, UserBean userBean)
			throws Exception {
		
		return null;
	}

	@Override
	public Userinfo findByuserinfoId(Long id) {
		
		return dao.findById(id);
	}

	@Override
	public List<Userinfo> queryMyParkOrder(Userinfo object, UserBean userBean)
			throws Exception {
		
		return null;
	}

	@Override
	public List<Userinfo> getOrderList(Long id) throws Exception {
		
		return null;
	}

	@Override
	public List<Userinfo> queryMyOrder(Userinfo object, UserBean userBean)
			throws Exception {
		
		return null;
	}

	public UserinfoDao getDao() {
		return dao;
	}

	public void setDao(UserinfoDao dao) {
		this.dao = dao;
	}

	@Override
	public List finduserlist(Userinfo userinfo,PageBean page) {
		List<Userinfo> list = dao.findchenge((Userinfo) userinfo, page);
		if(list==null || list.size()==0)
			return null;
		return list;
	}

	@Override
	public String delete(Integer id, Integer flag) throws Exception {
		return null;
	}

	@Override
	public List<Userinfo> findststus() {
		return dao.findststus();
	}

	@Override
	public String lock(Long id, Integer flag) {
		return dao.lock(id, flag);
	}

}
